package binary;

public class HexDemo {
    public static void main(String[] args) {
        int a=0x2ffff;
        int b=0b10_1110_1010_1011_0001;
        System.out.println("转2进制"+Integer.toBinaryString(a));
        System.out.println("转2进制"+Integer.toBinaryString(b));
        System.out.println("转16进制"+Integer.toHexString(a));
        System.out.println("转16进制"+Integer.toHexString(b));
        System.out.println("正常10进制"+a);
        System.out.println("正常10进制"+b);

    }
}
